package com.example.demo.controller;

import com.example.demo.bean.sku.Sku;
import com.example.demo.service.SkuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@Api(value="sku信息" )
@CrossOrigin
@RequestMapping("/sku")
public class SkuController {
    @Autowired
    SkuService skuService;

    @GetMapping("/{pmsId}")
    @ResponseBody
    @ApiOperation(value = "获取skuInfo")
    public Sku getSku(@PathVariable String pmsId) {
        return skuService.getSkuInfo(pmsId);
    }
}
